package com.ch;

import com.ch.service.CxfDemoService;
import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;

/**
 * @author CH
 * @date 2022/3/2
 */
public class ClientRun {
    public static void main(String[] args) {
        JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
        factory.setServiceClass(CxfDemoService.class);
        factory.setAddress("http://localhost:9000/cxfDemoService");
        CxfDemoService client = (CxfDemoService) factory.create();
        String reply = client.hello("Rayjun");
        System.out.println("Server : " + reply); // Server: hello rayjun
    }
}
